﻿<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Boladona</title>
	<?php echo $this->headLink()->appendStylesheet('/css/global.css'); ?>
	<?php echo $this->headLink()->appendStylesheet('/css/themes/smoothness/jquery-ui-1.7.1.custom.css'); ?>
	<?php $this->headScript()->appendFile('/js/seleciona_times_campeonato.js'); ?>
	<?php $this->headScript()->appendFile('/js/jquery.js'); ?>
	<?php $this->headScript()->appendFile('/js/jquery-ui.js'); ?>	
	<?php $this->headScript()->appendFile('/js/plugins/localisation/jquery.localisation-min.js'); ?>	
	<?php $this->headScript()->appendFile('/js/plugins/tmpl/jquery.tmpl.1.1.1.js'); ?>	
	<?php $this->headScript()->appendFile('/js/plugins/blockUI/jquery.blockUI.js'); ?>	
	<?php $this->headScript()->appendFile('/js/ui.multiselect.js'); ?>	
	<?php $this->headScript()->appendFile('/js/ordem-gol.js'); ?>
        <?php $this->headScript()->appendFile('/js/ordem-gol.js'); ?>
	<?php echo $this->headScript(); ?>

        <script type="text/javascript">
                function confirmaSaida(mensagem, link) {
                    if (confirm(mensagem)) {
                        location.href = link;
                    }
                }
        </script>


</head>

<body>
	<div id="cabecalhoText">
		<p>
			<?php 
			$credencial = Zend_Controller_Action_HelperBroker::getStaticHelper('logOn')->direct(false);
			
			if ($credencial != null): ?>
				<?php echo "Bem vindo, " . $credencial->getNome() . "." ?>
				<?php echo "Você tem " . $credencial->getBolitosString() . " bolitos." ?>
				 |
				<a href="<?php echo $this->url(
					array('controller'=>'usuario',
					'action' => 'alterar-dados'),
					'default',
					true); ?>">Configurações</a>
                                 |
				<a href="<?php echo $this->url(
					array('controller'=>'usuario',
					'action' => 'log-out'),
					'default',
					true); ?>">Logout</a>

                <?php if ($credencial->getAdministrador()): ?>
        			 |
	        		<a href="<?php echo $this->url(
		    	    	array('module' => 'administrador',
			    	    'controller' => 'index',
	    		    	'action' => 'index'
		    		    ))?>">Administração</a>
                <?php endif; ?>

			<?php else: ?>
				<a href="<?php echo $this->url(
					array('controller'=>'usuario',
					'action' => 'log-on'),
					'default',
					true); ?>">Login</a>

			 |
			<a href="<?php echo $this->url(
				array('controller'=>'usuario',
				'action' => 'novo'),
				'default',
				true) ?>">Cadastro</a>
			<?php endif; ?>
		</p>
	</div>
	<div id="cabecalhoGrande">
		<div id="cabecalho">
			<a href="<?php echo $this->baseUrl('/'); ?>">
				<img src="/images/topo.jpg" alt="Clique para voltar" />
			</a>
		</div>
	</div>
	<div id="conteudo">
		<?php echo $this->layout()->content ?>
	</div>
	<div id="footerGrande">
		<div id="footer">
			<div id="footerText">
				<p>Copyright de Turma de Engenharia de Software 2010.</p>
				<p>Todos os direitos reservados.</p>
			</div>
		</div>
	</div>
</body>
</html>
